Fix crash that can happen while loading into missions from the menu - #721
Fix crash that can happen while loading into missions from the menu#721hdr88 wants to merge 1 commit into
Conversation
AnthonyFuller
left a comment
There was a problem hiding this comment.
This is not exactly what I'd describe as a desirable fix. The "CacheBuster" is exactly that, the game caches JSON files retrieved from the server and the CacheBuster forces it to be re-requested. I don't think this is just a Dev feature, I believe it's partly needed for the general operation of the in-game menu.
I'm not dismissing this finding outright since it makes sense that this is causing a crash when it's destroyed and re-created, but I have definitely experienced a somewhat similar crash on official.
I'm going to test that, i'm not 100 % sure too but if it's reduce, it's could be already great tbh |
|
The fix works... It's does not result memory crash (ofc) but it's seem to work just fine ! |
|
EDIT : It's not result all crashes, probably someone else need to test the fix. |
Even without the changes i did, if i change some peacock setting in the menu, i do not see the game sending a request for a new JSON file at all. What it does, it sends a SubmitSemEmail request which is used to getAllFlags. Also i can see that in the response of the SubmitSemEmail request, there is a CacheBuster field and its value is a date, but it is not clear to me whether the game uses this for anything. |
|
@hdr88 Could you test this commit? 57e44fd Branch lennard/cachebuster-fix if you just want to clone and go. Do not apply it on top of the changes in the PR. |
I tested the commit and it works also, loaded into missions many times, game does not crash. |
|
Thank you for confirming, the missing "0" after the @ was intentional. There are ways to get it back, but it doesn't add anything. My branch would therefor be the preferred fix to the crash issue, since it does not remove the cache buster functionality during development. |
Scope
This change will fix crash that can happen while loading into missions from the menu. Relevant issue:
#596
Test Plan
After countless hours of trial and error, i narrowed the source of the crash to the lines 4-6 in static/peacock-menu/index.json:
"datavalues": {
"@global.CacheBuster": "0"
},
Removing this, the game no longer seems to crash during loading. Verified by loading into missions over and over (100+ at least). Without this fix, the game crashes something like 1 out of 15 times or so when loading a mission. Maybe i just got unbeliavably lucky though, so i would appreciate others trying this fix.
I also verified that the peacock menu in settings still work, so not sure what this CacheBuster is used for, other than making the game crash.
Checklist